#ifndef __IMAGEITEM_H__
#define __IMAGEITEM_H__

#include <QtGui/QWidget>
#include <QtGui/QGraphicsRectItem>
#include <QtGui/QImage>
#include <QtGui/QPainter>
#include <QtGui/QStyleOptionGraphicsItem>
#include <QtGui/QPixmap>

namespace verema {

/**
 * \brief class with the extended QGraphicsRectItem implementation for holding the background image
 */
class ImageItem : public QGraphicsRectItem
{
public:

    /**
     * \brief constructor
     * \param QImage holds the image that will be stored
     */
    ImageItem( QImage img );

    /**
     * \brief destructor
     */
    ~ImageItem(){};

protected:

    /**
     * \brief method for drawing the image
     */
    void paint( QPainter *, const QStyleOptionGraphicsItem *option, QWidget *widget );

private:
    QImage image;
    QPixmap pixmap;
 };

 }// namespace verema

#endif //__IMAGEITEM_H__
